package oop.java0328.work1;

public class JavaTeacher extends Teacher {
    private String major;

    public JavaTeacher(String major) {
        this.major = major;
    }

    public JavaTeacher(String name, int age, int workYear, String gender, String major) {
        super(name, age, workYear, gender);
        this.major = major;
    }

    public String getMajor() {
        return major;
    }

    public void setMajor(String major) {
        this.major = major;
    }

    @Override
    public void giveLession() {
        System.out.println("熟悉"+major+"使用idea上课");
    }
}
